package cn.bby.jtk.bean.util;

import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.util.ReflectUtil;

/**
 * @author ben
 * @since 2025/4/24 00:09
 */
public class FastBeanUtil extends BeanUtil {

    public static <T> T copyProperties(Object source, Class<T> targetType) {
        T target = ReflectUtil.newInstance(targetType);
        BeanUtil.copyProperties(source, target);
        return target;
    }

    public static <T> T copyProperties(Object source, T target) {
        BeanUtil.copyProperties(source, target);
        return target;
    }
}
